﻿#ifndef CAMERADAHUA_H
#define CAMERADAHUA_H

#include "camera.h"
#include <IMVApi.h>


class CameraDahua : public Camera
{
public:
    CameraDahua(const std::string name);

public slots:
    virtual void initialize() override;
    virtual void openCamera() override;
    virtual void startGrabbing()override;
    virtual void stopGrabbing()override;
    virtual void closeCamera() override;
    virtual void releaseCamera() override;
    virtual void preProcessImage(const ImageInfo &imgInfo) override;

//    virtual void readCameraParams() override;

    virtual void readCameraROI(const std::string& camName)override;
    virtual void readCameraWhiteBalance(const std::string& camName)override;
    virtual void readCameraBrightness(const std::string& camName)override;

    virtual void setCameraROI(const std::string& camName, const CameraROI &roi)override;
    virtual void setCameraWhiteBalance(const std::string& camName, const CameraWhiteBalance &cw)override;
    virtual void setCameraBrightness(const std::string& camName,  const CameraBrightness &cb)override;

   // virtual void writeCameraParams(const std::string& camName, const CameraROI &roi, const CameraWhiteBalance &cw, const CameraBrightness &cb);

private:
    virtual bool isColor(int pixelFormat) override;
    virtual bool isMono(int pixelFormat) override;

private:
    void* m_handle = nullptr;
};

#endif // CAMERADAHUA_H
